using Microsoft.AspNetCore.Mvc;
using Template.Service.IService;

namespace Template.WebApi.Controllers
{
    [ApiController]
    [Route("[controller]")]
    public class SampleController : ControllerBase
    {
        readonly ISampleService _sampleService;
        public SampleController(ISampleService sampleService)
        {
            _sampleService = sampleService;
        }
        // GET api/values
        [HttpGet]
        [Route("GetOneSampleVersion")]
        public async Task<string?> GetOneSampleVersion()
        {
            return await Task.Run(() => _sampleService.GetOne()?.Version);
        }

    }
}
